package com.siysoft.tc.reservation.service;

import java.sql.Timestamp;
import java.util.List;

import net.sf.json.JSONArray;

import com.siysoft.tc.base.bean.bo.AvatarBo;
import com.siysoft.tc.base.bean.bo.MessageBo;
import com.siysoft.tc.base.bean.bo.PTDetailBo;
import com.siysoft.tc.base.bean.bo.PaginationBo;
import com.siysoft.tc.base.bean.bo.ReservationBo;
import com.siysoft.tc.base.bean.bo.StudentEvaluationTotalBo;
import com.siysoft.tc.base.bean.bo.TeacherEvaluationTotalBo;

public interface IReservationService {

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @return
	 */
	String pay(Integer user_id, Integer reservation_id);

	/**
	 * 
	 * @param number
	 * @param pb
	 * @return
	 */
	List<MessageBo> getClassroom(String number, PaginationBo pb);

	/**
	 * 
	 * @param id
	 * @param number
	 * @param message
	 * @return
	 */
	Integer reply(Integer id, String number, String message);

	/**
	 * 
	 * @param id
	 * @param number
	 * @param state
	 * @return
	 */
	String state(Integer id, String number, Integer state);

	/**
	 * 
	 * @param reservation_id
	 * @return
	 */
	String getTeacherAvatar(Integer reservation_id);

	/**
	 * 
	 * @param id
	 * @param number
	 * @param goal
	 * @return
	 */
	Integer goal(Integer id, String number, Integer goal);

	/**
	 * 
	 * @param reservation_id
	 * @param pb
	 * @return
	 */
	List<AvatarBo> getstudent(Integer reservation_id, PaginationBo pb);

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @param evaluation
	 * @return
	 */
	Integer evaluateTeacher(Integer teacher_id, Integer reservation_id, JSONArray evaluation);

	/**
	 * 
	 * @param number
	 * @return
	 */
	PTDetailBo getTotalEvaluation(String number);

	/**
	 * 
	 * @param student_id
	 * @param reservation_id
	 * @param patience
	 * @param professionalism
	 * @param expression
	 * @param usefulness
	 * @param interaction
	 * @param detail
	 * @param isgoal
	 * @return
	 */
	String evaluateStudent(Integer student_id, Integer reservation_id,
			Integer patience, Integer professionalism, Integer expression,
			Integer usefulness, Integer interaction, String detail,
			Integer isgoal);

	/**
	 * 
	 * @param id
	 * @param school 
	 * @return
	 */
	List<ReservationBo> getAll(Integer id, String school);

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @param period 
	 * @param wage 
	 * @return
	 */
	String join(Integer user_id, Integer reservation_id, Integer wage, Integer period);

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @return
	 */
	String agree(Integer user_id, Integer reservation_id);

	/**
	 * 
	 * @param reservation_id
	 * @return
	 */
	String begin(Integer reservation_id);
	
	/**
	 * 
	 * @param reservation_id
	 * @return
	 */
	String finish(Integer reservation_id);

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @return
	 */
	String drop_out(Integer user_id, Integer reservation_id);

	/**
	 * 
	 * @paramu ser_id
	 * @param reservation_id
	 * @return
	 */
	String finish_evaluate(Integer user_id, Integer reservation_id);
	
	/**
	 * 
	 * @param id
	 * @return
	 */
	TeacherEvaluationTotalBo get_teacher_evaluation_total(Integer id);

	/**
	 * 
	 * @param id
	 * @param user_name
	 * @param reservation_number
	 * @param school
	 * @param lecture
	 * @param course
	 * @param max_size
	 * @param address
	 * @param time
	 * @param period
	 * @param goal
	 * @param wage
	 * @param bonus
	 * @param ispublic
	 * @param administrator
	 * @return
	 */
	Integer apply(Integer id, String user_name, String reservation_number,
			String school, String lecture, String course, Integer max_size,
			String address, Timestamp time, Integer period, Integer goal,
			Integer wage, Integer bonus, Integer ispublic, Integer administrator);

	/**
	 * 
	 * @param user_id
	 * @param reservation_id
	 * @return
	 */
	StudentEvaluationTotalBo get_student_evaluation_total(Integer user_id,
			Integer reservation_id);

	/**
	 * 
	 * @param user_id
	 * @param lecture
	 * @param course
	 * @param school 
	 * @return
	 */
	List<ReservationBo> search(Integer user_id, String lecture, String course, String school);

	/**
	 * 
	 * @param user_id 
	 * @param select_str
	 * @param school 
	 * @return
	 */
	List<ReservationBo> search2(Integer user_id, String select_str, String school);

	/**
	 * 
	 * @param reservation_id
	 * @param school
	 * @param lecture
	 * @param max_size
	 * @param address
	 * @param time
	 * @param period
	 * @param goal
	 * @param wage
	 * @param bonus
	 * @return
	 */
	Integer update(Integer reservation_id, String school, String lecture,
			Integer max_size, String address, Timestamp time, Integer period,
			Integer goal, Integer wage, Integer bonus);

	/**
	 * 
	 * @param user_id
	 * @param content
	 * @return
	 */
	Integer sendInvite(Integer user_id, String content);

}
